package com.centling.smartSealForPhone.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author fionera
 */
public class LoginBean implements Parcelable {
    /**
     * id : 1
     * username : derrickLogin
     * realName : heeh
     * phone : 1234567890
     */

    private UserBean userLogin;
    /**
     * userLogin : {"id":1,"username":"derrick","realName":"heeh","phone":"1234567890"}
     * isBlueTooth : 1
     * equipRegisterInfo : {"equipType":"1","sn":"","embededSn":"","equipStatus":"0","sealName":"caiwu","orgName":"财务部","blueToothMac":""}
     * token : token
     */

    private String isBlueTooth;
    /**
     * equipType : 1
     * sn :
     * embededSn :
     * equipStatus : 0
     * sealName : caiwu
     * orgName : 财务部
     * blueToothMac :
     */

    private EquipBean equipRegisterInfo;
    private int sealApplyCountCheckedFail;
    private int sealApplyCountChecked;
    private String enableAppPull;
    private String token;

    public UserBean getUserLogin() {
        return userLogin;
    }

    public void setUserLogin(UserBean userLogin) {
        this.userLogin = userLogin;
    }

    public EquipBean getEquipRegisterInfo() {
        return equipRegisterInfo;
    }

    public void setEquipRegisterInfo(EquipBean equipRegisterInfo) {
        this.equipRegisterInfo = equipRegisterInfo;
    }

    public int getSealApplyCountCheckedFail() {
        return sealApplyCountCheckedFail;
    }

    public void setSealApplyCountCheckedFail(int sealApplyCountCheckedFail) {
        this.sealApplyCountCheckedFail = sealApplyCountCheckedFail;
    }

    public int getSealApplyCountChecked() {
        return sealApplyCountChecked;
    }

    public void setSealApplyCountChecked(int sealApplyCountChecked) {
        this.sealApplyCountChecked = sealApplyCountChecked;
    }

    public String getEnableAppPull() {
        return enableAppPull;
    }

    public void setEnableAppPull(String enableAppPull) {
        this.enableAppPull = enableAppPull;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }


    public static final Parcelable.Creator<LoginBean> CREATOR = new Parcelable.Creator<LoginBean>() {
        @Override
        public LoginBean createFromParcel(Parcel source) {
            return new LoginBean(source);
        }

        @Override
        public LoginBean[] newArray(int size) {
            return new LoginBean[size];
        }
    };

    public LoginBean() {
    }

    protected LoginBean(Parcel in) {
        this.userLogin = in.readParcelable(UserBean.class.getClassLoader());
        this.isBlueTooth = in.readString();
        this.equipRegisterInfo = in.readParcelable(EquipBean.class.getClassLoader());
        this.token = in.readString();
        this.enableAppPull = in.readString();
        this.sealApplyCountChecked = in.readInt();
        this.sealApplyCountCheckedFail = in.readInt();
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.userLogin, flags);
        dest.writeString(this.isBlueTooth);
        dest.writeParcelable(this.equipRegisterInfo, flags);
        dest.writeString(this.enableAppPull);
        dest.writeString(this.token);
        dest.writeInt(this.sealApplyCountCheckedFail);
        dest.writeInt(this.sealApplyCountChecked);
    }
}
